/*
 * queue.h
 *
 *  Created on: Jan 28, 2012
 *      Author: marco
 */

#ifndef QUEUE_H_
#define QUEUE_H_

typedef struct queue_node{
	 void *data;
	 struct queue_node *next;
}queue_node;

typedef struct queue{
	queue_node *head;
	queue_node *tail;
	pthread_mutex_t *mtx;

}queue;

queue* init_queue(queue *q, pthread_mutex_t *mtx);
int enqueue(queue *, void *);
//void remove(queue *, void *);

static void sigalarm_handler(int signum);


#endif /* QUEUE_H_ */
